package com.example.oa_boot.test.controller;

import com.example.oa_boot.test.domain.Dept;
import com.example.oa_boot.test.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DeptController {
    @Autowired
    DeptService deptService;
    @GetMapping("/selectall")
    public List<Dept> selectall(){
        return deptService.selectAll();
//        return "s";
    }
    @GetMapping("/kk")
    public   String select()
    {
// return "sssss";
        return deptService.select().toString();
    }

}
